FROM registry.cn-hangzhou.aliyuncs.com/base-linux/centos7.6:jkd8
MAINTAINER this is Micro-gateway image <boren>
RUN mkdir /home/gateway
RUN mkdir /home/gateway/logs
#导入jar包
ADD gateway-client-0.0.1-SNAPSHOT.jar  /home/gateway/gateway.jar
ADD start.sh /home/gateway/start.sh 
RUN chmod 755 /home/gateway/start.sh 
# 暴露服务端口
EXPOSE 8020
#数据卷挂载
VOLUME ["/home/gateway/logs"]
WORKDIR /home/gateway/
# entrypoint：设定容器启动时第一个运行的命令及参数
#ENTRYPOINT ["/bin/bash","start.sh"]
ENTRYPOINT ["java","-Duser.timezone=GMT+8","-Xms256m","-Xmx512","-XX:+HeapDumpOnOutOfMemoryError","-XX:HeapDumpPath=./","-XX:NewSize=256m","-XX:MaxNewSize=512m","-jar","gateway.jar","--spring.profiles.active=pro"]

